#pragma once
#include "PrefixDefine.h"
#include "BaseObject.h"

typedef std::function<void(void *pSample)> RELEASELISTENER;
class CBaseSample : public CBaseObject
{
public:
	CBaseSample();
	virtual ~CBaseSample();
	virtual int Release();
	int encoding(char * pszBuffer, const int nBufferSize);
	int decoding(const char * pBuffer, const int nBufferSize);

public:
	virtual CBaseSample * CreateInstance() = 0;
	void SetReleaseListener(RELEASELISTENER listener);

private:
	RELEASELISTENER m_fReleaseListener;
};

